package com.project.webpage.controller;


import com.github.pagehelper.PageInfo;
import com.project.webpage.aop.TagLog;
import com.project.webpage.dto.SearchByMonthParam;
import com.project.webpage.service.GjxlYbService;
import com.project.webpage.util.RestResult;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/api/webpage/gjxlyb/")
public class GjxlYbController extends BaseController {


    @Resource
    GjxlYbService gjxlYbService;

    /**
     * 线路客流列表查询
     */
    @PostMapping("passenger/page")
    @TagLog(operation = 0, content = "查询线路客流列表")
    public RestResult passengerPage(@RequestBody SearchByMonthParam param) {
        this.getPage(true, param);
        return RestResult.ok(new PageInfo<>(gjxlYbService.getPassengerListForPage(param)));
    }

    /**
     * 线路客流导出列表
     */
    @PostMapping("passenger/output")
    @TagLog(operation = 5, content = "导出线路客流列表")
    public RestResult passengerOutput(@RequestBody SearchByMonthParam param) {
        this.getPage(false, param);
        return RestResult.ok(gjxlYbService.getPassengerListForPage(param));
    }

    /**
     * 公交走廊客流列表查询
     */
    @PostMapping("passenger/zlxl/page")
    @TagLog(operation = 0, content = "查询公交走廊客流列表")
    public RestResult passengerZlxlPage(@RequestBody SearchByMonthParam param) {
        this.getPage(true, param);
        return RestResult.ok(new PageInfo<>(gjxlYbService.getPassengerZlxlListForPage(param)));
    }

    /**
     * 公交走廊客流导出列表
     */
    @PostMapping("passenger/zlxl/output")
    @TagLog(operation = 5, content = "导出公交走廊客流列表")
    public RestResult passengerZlxlOutput(@RequestBody SearchByMonthParam param) {
        this.getPage(false, param);
        return RestResult.ok(gjxlYbService.getPassengerZlxlListForPage(param));
    }

    /**
     * 线路客流特征分析列表查询
     */
    @PostMapping("passenger/feature/page")
    @TagLog(operation = 0, content = "查询线路客流特征分析列表")
    public RestResult passengerFeaturePage(@RequestBody SearchByMonthParam param) {
        this.getPage(true, param);
        return RestResult.ok(new PageInfo<>(gjxlYbService.getPassengerFeaturelListForPage(param)));
    }

    /**
     * 线路客流特征分析导出列表
     */
    @PostMapping("passenger/feature/output")
    @TagLog(operation = 5, content = "导出线路客流特征分析列表")
    public RestResult passengerFeatureOutput(@RequestBody SearchByMonthParam param) {
        this.getPage(false, param);
        return RestResult.ok(gjxlYbService.getPassengerFeaturelListForPage(param));
    }

    /**
     * 基于动态客流采集的客流数据核查列表查询
     */
    @PostMapping("passenger/bc/page")
    @TagLog(operation = 0, content = "查询基于动态客流采集的客流数据核查列表")
    public RestResult passengerBcPage(@RequestBody SearchByMonthParam param) {
        this.getPage(true, param);
        return RestResult.ok(new PageInfo<>(gjxlYbService.getPassengerBcListForPage(param)));
    }

    /**
     * 基于动态客流采集的客流数据核查导出列表
     */
    @PostMapping("passenger/bc/output")
    @TagLog(operation = 5, content = "导出基于动态客流采集的客流数据核查列表")
    public RestResult passengerBcOutput(@RequestBody SearchByMonthParam param) {
        this.getPage(false, param);
        return RestResult.ok(gjxlYbService.getPassengerBcListForPage(param));
    }

    /**
     * 客流站点集聚特征分析列表查询
     */
    @PostMapping("passenger/zj/page")
    @TagLog(operation = 0, content = "查询客流站点集聚特征分析列表")
    public RestResult passengerZjPage(@RequestBody SearchByMonthParam param) {
        this.getPage(true, param);
        return RestResult.ok(new PageInfo<>(gjxlYbService.getPassengerZjListForPage(param)));
    }

    /**
     * 基于动态客流采集的客流数据核查导出列表
     */
    @PostMapping("passenger/zj/output")
    @TagLog(operation = 5, content = "导出客流站点集聚特征分析列表")
    public RestResult passengerZjOutput(@RequestBody SearchByMonthParam param) {
        this.getPage(false, param);
        return RestResult.ok(gjxlYbService.getPassengerZjListForPage(param));
    }

    /**
     * 基于客流和里程的能耗水平分析列表查询
     */
    @PostMapping("passenger/nh/page")
    @TagLog(operation = 0, content = "查询基于客流和里程的能耗水平分析列表")
    public RestResult passengerNhPage(@RequestBody SearchByMonthParam param) {
        this.getPage(true, param);
        return RestResult.ok(new PageInfo<>(gjxlYbService.getPassengerNhListForPage(param)));
    }

    /**
     * 基于动态客流采集的客流数据核查导出列表
     */
    @PostMapping("passenger/nh/output")
    @TagLog(operation = 5, content = "导出基于客流和里程的能耗水平分析列表")
    public RestResult passengerNhOutput(@RequestBody SearchByMonthParam param) {
        this.getPage(false, param);
        return RestResult.ok(gjxlYbService.getPassengerNhListForPage(param));
    }

    /**
     * 客流空间分布列表查询
     */
    @PostMapping("passenger/xlqs/page")
    @TagLog(operation = 0, content = "查询客流空间分布列表")
    public RestResult passengerXlqsPage(@RequestBody SearchByMonthParam param) {
        this.getPage(false, param);
        return RestResult.ok(gjxlYbService.getPassengerXlqsListForPage(param));
    }

    /**
     * 企业成本数据分析列表查询
     */
    @PostMapping("company/nh/page")
    @TagLog(operation = 0, content = "查询企业成本数据分析列表")
    public RestResult companyNhPage(@RequestBody SearchByMonthParam param) {
        this.getPage(true, param);
        return RestResult.ok(new PageInfo<>(gjxlYbService.getCompanyNhListForPage(param)));
    }

    /**
     * 企业成本数据分析导出列表
     */
    @PostMapping("company/nh/output")
    @TagLog(operation = 5, content = "导出企业成本数据分析列表")
    public RestResult companyNhOutput(@RequestBody SearchByMonthParam param) {
        this.getPage(false, param);
        return RestResult.ok(gjxlYbService.getCompanyNhListForPage(param));
    }

    /**
     * 企业运营效率分析列表查询
     */
    @PostMapping("company/income/page")
    @TagLog(operation = 0, content = "查询企业运营效率分析列表")
    public RestResult companyIncomePage(@RequestBody SearchByMonthParam param) {
        this.getPage(true, param);
        return RestResult.ok(new PageInfo<>(gjxlYbService.getCompanyIncomeListForPage(param)));
    }

    /**
     * 企业运营效率分析导出列表
     */
    @PostMapping("company/income/output")
    @TagLog(operation = 5, content = "导出企业运营效率分析列表")
    public RestResult companyIncomeOutput(@RequestBody SearchByMonthParam param) {
        this.getPage(false, param);
        return RestResult.ok(gjxlYbService.getCompanyIncomeListForPage(param));
    }

    /**
     * 线路区域能耗分析列表查询
     */
    @PostMapping("xlqs/nh/page")
    @TagLog(operation = 0, content = "查询线路区域能耗分析列表")
    public RestResult xlqsNhPage(@RequestBody SearchByMonthParam param) {
        this.getPage(false, param);
        return RestResult.ok(gjxlYbService.getCompanyXlqsNhListForPage(param));
    }

    /**
     * 客流趋势列表查询
     */
    @PostMapping("passenger/compare/page")
    @TagLog(operation = 0, content = "查询客流趋势列表")
    public RestResult passengerComparePage(@RequestBody SearchByMonthParam param) {
        this.getPage(true, param);
        return RestResult.ok(new PageInfo<>(gjxlYbService.getPassengerCompareListForPage(param)));
    }

    /**
     * 客流趋势导出列表
     */
    @PostMapping("passenger/compare/output")
    @TagLog(operation = 5, content = "导出客流趋势列表")
    public RestResult passengerCompareOutput(@RequestBody SearchByMonthParam param) {
        this.getPage(false, param);
        return RestResult.ok(gjxlYbService.getPassengerCompareListForPage(param));
    }

    /**
     * 车型能耗分析列表查询
     */
    @PostMapping("bus/nh/page")
    @TagLog(operation = 0, content = "查询车型能耗分析列表")
    public RestResult busNhPage(@RequestBody SearchByMonthParam param) {
        this.getPage(true, param);
        return RestResult.ok(new PageInfo<>(gjxlYbService.getBusNhListForPage(param)));
    }

    /**
     * 车型能耗分析导出列表
     */
    @PostMapping("bus/nh/output")
    @TagLog(operation = 5, content = "导出车型能耗分析列表")
    public RestResult busNhOutput(@RequestBody SearchByMonthParam param) {
        this.getPage(false, param);
        return RestResult.ok(gjxlYbService.getBusNhListForPage(param));
    }

    /**
     * 线路换乘补贴列表查询
     */
    @PostMapping("passenger/change/income/page")
    @TagLog(operation = 0, content = "查询线路换乘补贴列表")
    public RestResult changeIncomePage(@RequestBody SearchByMonthParam param) {
        this.getPage(true, param);
        return RestResult.ok(new PageInfo<>(gjxlYbService.getPassengerChangeIncomeListForPage(param)));
    }

    /**
     * 线路换乘补贴导出列表
     */
    @PostMapping("passenger/change/income/output")
    @TagLog(operation = 5, content = "导出线路换乘补贴列表")
    public RestResult changeIncomeOutput(@RequestBody SearchByMonthParam param) {
        this.getPage(false, param);
        return RestResult.ok(gjxlYbService.getPassengerChangeIncomeListForPage(param));
    }
}
